package practice2;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class P8597 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String init = sc.next();
        String target = sc.next();
        char[] initArr = init.toCharArray();
        char[] targetArr = target.toCharArray();
        List<Integer> differIndex = new ArrayList<>();
        for(int i=0;i<init.length();i++){
            if(initArr[i] != targetArr[i]){     //将不同处的下标记录
                differIndex.add(i);
            }
        }
        int ans =0;
        int count = differIndex.size()/2;       //进行相减的次数
        for(int i =0;i<count;i++){
            ans+= differIndex.get(2*i+1) - differIndex.get(2*i);    //将不同处的下标相减即为需要翻动的次数
        }
        System.out.println(ans);
    }
}
